/*
 * Created by JFormDesigner on Tue Nov 10 10:41:49 CET 2009
 */

package at.jku.pervasive.gui.jformdesigner;

import javax.swing.*;
import javax.swing.table.*;
import at.jku.pervasive.gui.*;
import com.jgoodies.forms.factories.*;
import com.jgoodies.forms.layout.*;

/**
 * @author SHOCKIE
 */
public class VisualizationPanel extends JPanel {
	public VisualizationPanel() {
		initComponents();
	}

	private void initComponents() {
		// JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
		// Generated using JFormDesigner Open Source Project license - unknown
		JScrollPane tagPositionScrollPanel = new JScrollPane();
		tagPositionTable = new JTable();
		CellConstraints cc = new CellConstraints();

		//======== this ========
		setLayout(new FormLayout(
			new ColumnSpec[] {
				new ColumnSpec("max(min;150dlu)"),
				FormFactory.LABEL_COMPONENT_GAP_COLSPEC,
				new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW)
			},
			RowSpec.decodeSpecs("fill:default:grow")));

		//======== tagPositionScrollPanel ========
		{

			//---- tagPositionTable ----
			tagPositionTable.setModel(new DefaultTableModel(
				new Object[][] {
					{null, null, null, null, null},
				},
				new String[] {
					"Tag-ID", "X", "Y", "Z", "last seen"
				}
			) {
				Class[] columnTypes = new Class[] {
					String.class, Double.class, Double.class, Double.class, Object.class
				};
				boolean[] columnEditable = new boolean[] {
					false, false, false, false, false
				};
				@Override
				public Class<?> getColumnClass(int columnIndex) {
					return columnTypes[columnIndex];
				}
				@Override
				public boolean isCellEditable(int rowIndex, int columnIndex) {
					return columnEditable[columnIndex];
				}
			});
			tagPositionScrollPanel.setViewportView(tagPositionTable);
		}
		add(tagPositionScrollPanel, cc.xy(1, 1));
		// JFormDesigner - End of component initialization  //GEN-END:initComponents
	}

	// JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
	// Generated using JFormDesigner Open Source Project license - unknown
	private JTable tagPositionTable;
	// JFormDesigner - End of variables declaration  //GEN-END:variables
}
